//
//	DietActionDetailInfoModel.swift
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport

import Foundation 
import ObjectMapper


class DietActionDetailInfoModel : NSObject, NSCoding, Mappable{

	var calorie : String?
	var createTime : String?
	var createUser : Int?
	var dietDetailList : [DietActionDetailDietDetailList]?
	var dietFoodList : [DietActionDetailDietFoodList]?
	var enName : String?
	var id : Int?
	var introduce : String?
	var isDeleted : Int?
	var label : String?
	var practice : String?
	var previewUrl : String?
	var sort : Int?
	var status : Int?
	var updateTime : String?
	var updateUser : Int?
	var version : Int?
	var zhName : String?


	class func newInstance(map: Map) -> Mappable?{
		return DietActionDetailInfoModel()
	}
	required init?(map: Map){}
	private override init(){}

	func mapping(map: Map)
	{
		calorie <- map["calorie"]
		createTime <- map["createTime"]
		createUser <- map["createUser"]
		dietDetailList <- map["dietDetailList"]
		dietFoodList <- map["dietFoodList"]
		enName <- map["enName"]
		id <- map["id"]
		introduce <- map["introduce"]
		isDeleted <- map["isDeleted"]
		label <- map["label"]
		practice <- map["practice"]
		previewUrl <- map["previewUrl"]
		sort <- map["sort"]
		status <- map["status"]
		updateTime <- map["updateTime"]
		updateUser <- map["updateUser"]
		version <- map["version"]
		zhName <- map["zhName"]
		
	}

    /**
    * NSCoding required initializer.
    * Fills the data from the passed decoder
    */
    @objc required init(coder aDecoder: NSCoder)
	{
         calorie = aDecoder.decodeObject(forKey: "calorie") as? String
         createTime = aDecoder.decodeObject(forKey: "createTime") as? String
         createUser = aDecoder.decodeObject(forKey: "createUser") as? Int
         dietDetailList = aDecoder.decodeObject(forKey: "dietDetailList") as? [DietActionDetailDietDetailList]
         dietFoodList = aDecoder.decodeObject(forKey: "dietFoodList") as? [DietActionDetailDietFoodList]
         enName = aDecoder.decodeObject(forKey: "enName") as? String
         id = aDecoder.decodeObject(forKey: "id") as? Int
         introduce = aDecoder.decodeObject(forKey: "introduce") as? String
         isDeleted = aDecoder.decodeObject(forKey: "isDeleted") as? Int
         label = aDecoder.decodeObject(forKey: "label") as? String
         practice = aDecoder.decodeObject(forKey: "practice") as? String
         previewUrl = aDecoder.decodeObject(forKey: "previewUrl") as? String
         sort = aDecoder.decodeObject(forKey: "sort") as? Int
         status = aDecoder.decodeObject(forKey: "status") as? Int
         updateTime = aDecoder.decodeObject(forKey: "updateTime") as? String
         updateUser = aDecoder.decodeObject(forKey: "updateUser") as? Int
         version = aDecoder.decodeObject(forKey: "version") as? Int
         zhName = aDecoder.decodeObject(forKey: "zhName") as? String

	}

    /**
    * NSCoding required method.
    * Encodes mode properties into the decoder
    */
    @objc func encode(with aCoder: NSCoder)
	{
		if calorie != nil{
			aCoder.encode(calorie, forKey: "calorie")
		}
		if createTime != nil{
			aCoder.encode(createTime, forKey: "createTime")
		}
		if createUser != nil{
			aCoder.encode(createUser, forKey: "createUser")
		}
		if dietDetailList != nil{
			aCoder.encode(dietDetailList, forKey: "dietDetailList")
		}
		if dietFoodList != nil{
			aCoder.encode(dietFoodList, forKey: "dietFoodList")
		}
		if enName != nil{
			aCoder.encode(enName, forKey: "enName")
		}
		if id != nil{
			aCoder.encode(id, forKey: "id")
		}
		if introduce != nil{
			aCoder.encode(introduce, forKey: "introduce")
		}
		if isDeleted != nil{
			aCoder.encode(isDeleted, forKey: "isDeleted")
		}
		if label != nil{
			aCoder.encode(label, forKey: "label")
		}
		if practice != nil{
			aCoder.encode(practice, forKey: "practice")
		}
		if previewUrl != nil{
			aCoder.encode(previewUrl, forKey: "previewUrl")
		}
		if sort != nil{
			aCoder.encode(sort, forKey: "sort")
		}
		if status != nil{
			aCoder.encode(status, forKey: "status")
		}
		if updateTime != nil{
			aCoder.encode(updateTime, forKey: "updateTime")
		}
		if updateUser != nil{
			aCoder.encode(updateUser, forKey: "updateUser")
		}
		if version != nil{
			aCoder.encode(version, forKey: "version")
		}
		if zhName != nil{
			aCoder.encode(zhName, forKey: "zhName")
		}

	}

}